<template>
  <div>
    <svg :style="{ width, height }">
      <use :xlink:href="url + img" :fill="color"></use>
    </svg>
  </div>
</template>

<script setup lang="ts">
defineProps({
  url: {
    type: String,
    default: "#icon-",
    // 路径前缀
  },
  img: {
    type: String,
  },
  color: {
    type: String,
    default: "",
  },
  width: {
    type: String,
    default: "200px",
  },
  height: {
    type: String,
    default: "16px",
  },
})
</script>

<style scoped></style>
